package com.chainzouzou.Java_Programming_A;

import java.util.Scanner;

public class bct04 {
//FloatingPoint
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
String s = sc.nextLine();
/*将字符串对象中的字符转换为一个字符数组*/
char[] ch = s.toCharArray();
int sum = 0;
for (int i = 0; i < ch.length; i++) {
if (ch[i] == '-'|| ch[i] == '.') {

} else {
//将字符char类型转换成int类型    使用String的valueOf静态方法先将基本数据类型转化为字符
int temp = Integer.parseInt(String.valueOf(ch[i]));
sum += temp;
}
}
System.out.println(sum);
}
}
}


